package com.mida.app.report.controller;

import com.mida.app.report.service.DocKnwConceptualService;
import com.mida.dms.knw.entity.KnwConceptualDetail;
import com.mida.tool.common.result.ListResult;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 快速写入
 */
@RestController
@RequestMapping("/knwConceptualDetail")
@CrossOrigin
@Slf4j
public class DocKnwConceptualController {

    @Autowired
    private DocKnwConceptualService docKnwConceptualService;

    /**
     * 根据概念soid查询所有概念描述信息
     */
    @ApiOperation(value = "根据概念soid查询所有概念描述信息", notes = "根据概念soid查询所有概念描述信息")
    @GetMapping(value = "/findAllByConceptSoid",produces = { "application/json;charset=UTF-8" })
    public ListResult<List<KnwConceptualDetail>> findAllByConceptSoid(Long conceptualSoid) {
        return docKnwConceptualService.findAllByConceptSoid(conceptualSoid);
    }

    @ApiOperation(value = "根据概念描述soid查询概念描述信息",notes = "根据概念描述soid查询概念描述信息")
    @GetMapping(value = "/findByConceptualDetailSoid",produces = {"application/json;charset=UTF-8"})
    @ResponseBody
    public ListResult<KnwConceptualDetail> findByConceptualDetailSoid(Long conceptualDetailSoid){
        return docKnwConceptualService.findByConceptualDetailSoid(conceptualDetailSoid);
    }
}

